<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ page import="java.util.Set" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="com.sanqing.po.Employee,com.sanqing.po.Training" %>
<%@ page import="com.sanqing.tool.DateUtil" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人力资源管理系统</title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css " type="text/css" media="all" />
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
<!--
.atten {font-size:12px;font-weight:normal;color:#F00;}
-->
</style>

</head>
<body class="ContentBody">
<form name="educateForm" method="post" action=" " onsubmit="return educateValidate();">
<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >培训人员录入</th>
  </tr>
  <tr>
    <td class="CPanel">
		
		<table border="0" cellpadding="0" cellspacing="0" style="width:80%" align="center">
		<tr><td align="left">
		<input type="submit"value="保存" class="button"/>　
			
			<input type="reset" value="添加" class="button" onclick="openwin()"/>
		</td></tr>
		
		<TR>
			<TD width="100%">
			<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
	 <tr bgcolor="#EEEEEE">
		<td width="10%" align="center" height="30">编号</td>
		<td width="10%" align="center" >姓名</td>
		<td width="10%" align="center" >性别</td>
		<td width="10%" align="center" >出生日期</td>
		<td width="10%" align="center" >联系电话</td>
		<td width="10%" align="center" >邮箱</td>
		<td width="10%" align="center" >创建日期</td>
		<td width="10%" align="center" >执行操作</td>
	 </tr>
	 <% 
	 Training t = (Training)request.getAttribute("training");
	 if(t!=null){
	 Set employees = (Set)t.getEmployees();
	 if(employees!=null&&employees.size()>0){
	 Iterator it = employees.iterator();
	 while(it.hasNext()){
	   Employee e = (Employee)it.next();
	 %>
	<tr bgcolor="#FFFFFF">
		<td height="22" align="center" ><%=e.getId() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getName() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getSex()?"男":"女"%>&nbsp;</td>
		<td height="22" align="center" ><%=DateUtil.parseToString(e.getBirthday(),DateUtil.yyyyMMdd)%>&nbsp;</td>
		<td height="22" align="center" ><%=e.getPhone() %>&nbsp;</td>
		<td height="22" align="center" ><%=e.getEmail() %>&nbsp;</td>
		<td height="22" align="center" ><%=DateUtil.parseToString(e.getCreatetime(),DateUtil.yyyyMMdd)%>&nbsp;</td>
		<td height="22" align="center" ><a href="train.do?method=deleteTrainees&id=<%=t.getId()%>&empId=<%=e.getId()%>" target="_self">删除</a></td>
	</tr>
	<%}}}else{ %>
    <tr  bgcolor="#FFFFFF">
		<td height="22" colspan="8" align="center" >对不起，暂时没有人员信息！！！</td>
	</tr>
	<%} %>
</table>
			</TD>
		</TR>
		</TABLE>
	 </td>
  </tr>
		<TR>
			<TD colspan="2" align="center" height="50px">
			<input name="提交" type="submit" class="button" value="保存"/>　
			<input name="退出" type="reset" class="button" value="退出"/></TD>
		</TR>
	</TABLE>	
</div>
</form>
<script type="text/javascript">
function openwin(){
   window.showModalDialog("train.do?method=listEmployee&id=<%=t.getId()%>&number="+Math.random(),window,"dialogWidth=800px;dialogHeight=400px");
   //if(str!=null&&str.equal("ok")){
     //window.reload();
  // }
}
</script>
</body>
</html>

